<?php
// +----------------------------------------------------------------------
// | Author: derek <693472824@qq.com> <http://www.bloveambition.com/>
// +----------------------------------------------------------------------

namespace Worker\Controller;
use Think\Model;
use Worker\Logic\WorkerLogic;

/**
 * 服务细项控制器
 * @author derek <693472824@qq.com>
 */
class ClassController extends BaseController {
    
    /**
     * 服务细项列表
     */
    public function detailList(){
        
        $account = I('POST.account');
        $token = I('POST.token');
        
        //价格为0时表示面议，即协议费
        $map['price'] = array('gt', '0');
        
        $detailModel = M('ClassDetail');
        $list = $detailModel->where($map)->field('detail_id,detail_name,price,unit')->select();
        
        $unitList = get_dictionary_enum('unit_options');
        sort($unitList);
        
        $rspCont['list'] = $list;
        $rspCont['unitList'] = $unitList;
        
        $this->rsp['rspCode'] = '200';
        $this->rsp['rspCont'] = $rspCont;
        
        exit(json_encode($this->rsp));
    }
    
    
}
